import sys

def get_last_word_length():
    for line in sys.stdin:
        a = line.strip().split(" ")
        print(len(a[-1]))

def countByWord():
    line = None
    char = None
    for i in sys.stdin:
        if line == None:
            line = i.strip().upper()
            continue
        char = i.upper().strip()
        a = line.count(char)
        print(a)

def xx03():
    line_count = 0
    arr = []

    for line in sys.stdin:
        line = line.strip()
        if line_count == 0:
            line_count = int(line)
            continue
        arr.append(int(line))
        if len(arr) == line_count:
            for j in sorted(set(arr)):
                print(j)
            line_count = 0
            arr = []

if __name__ == '__main__':
    pass